package com.snap.awesomeserial;

/**
 * 存放app的一些配置项及默认参数
 */
public class AppConfig {

    public static class Dynamic {
        public static boolean exp_detail_show_fit_step = false;

        public static boolean next_exp_calc_light_coeff = false;

        public static int test_read_temp_module_count = 0;//读温测试模块的数量

        public static boolean show_temp_value = false;//是否显示温度数值

        public static boolean next_exp_calc_temp_drift = false;
        public static boolean fan=false;
        public static boolean light=false;
    }

    //项目文件主路径
    public static final String ROOT_DIRECTORY = "/PCR" + BuildConfig.FLAVOR + "/";
    //模板路径
    public static final String TEMPLATE_DIRECTORY = ROOT_DIRECTORY + "Template/";
    //历史数据路径
    public static final String EXPERIMENT_DIRECTORY = ROOT_DIRECTORY + "Experiment/";
    //数据库文件存储目录
    public static final String DATABASE_DIRECTORY = ROOT_DIRECTORY + "Database";
    //实验日志目录
    public static final String EXP_LOG_DIRECTORY = ROOT_DIRECTORY + "ExpLog";
    //操作日志目录
    public static final String LOG_DIRECTORY = ROOT_DIRECTORY + "Log";
    //excel文件导出目录
    public static final String EXCEL_DIRECTORY = ROOT_DIRECTORY + "Excel/";
    //图片保存路径
    public static final String IMG_DIRECTORY = ROOT_DIRECTORY + "Screenshot/";

    //硬件配置项目
//    public static final String SERIAL_PORT = "/dev/ttyMT2";//亿云付
    public static final String SERIAL_PORT = "/dev/ttyS3";
    public static final int SERIAL_BAUD_RATE = 9600;
//    public static final int SERIAL_BAUD_RATE = 115200;

    public static final int GROUP_COUNT = 1;//一共多少组
    public static final int TOTAL_CHANNEL_COUNT = 4;//总共通道数量
    public static final String[] CHANNEL_NAMES = {"fam", "vic", "rox", "cy5"};

    //指令配置项目
    public static final int DEVICE_TYPE = 1;//设备号 指令中用到
    public static final int LIGHTING_MODULE_INDEX = 0x30;//采光指令相关时使用的模块号

    //电机角度和仓位的关系
    public static final float[][] HOLE_ANGLE = {
            {0f, 110.15f, 138.15f, 166.15f, 194.15f, 250.15f, 278.15f, 306.15f, 334.15f, 26.15f, 54.15f},
            {0f, 290.15f, 318.15f, 346.15f, 14.15f, 70.15f, 98.15f, 126.15f, 154.15f, 206.15f, 234.15f}};
    public static final int HORIZONTAL_RPM = 60;
    public static final int VERVICAL_RPM = 240;
    public static final int VERVICAL_SLOW_RPM = 60;
    public static final int VERVICAL_INJECT_RPM = 15;

    //软件配置项目
    public static final float PRECISION = 1f;//温度误差    值为1f ， 代表目标温度上下浮动1°C以内，即2°C的范围
    public static final int REQUIRE_HOLD_TIME = 1;//维持次数，连续在目标温度区间的次数后开始计时
    public static final int LIGHTING_PRE_SECOND = 10;//采光操作提前的秒数

    //一些默认值
    public static final float DEF_ENV_TEMP = 50f;//环境温度默认值
    public static final int DEF_LIGHT_BASE = 2000;//荧光校准目标值
    public static final int DEF_CALC_STRATEGY = Constants.CALC_STRATEGY_CURVATURE;//Ct值默认分析方法

    //荧光校准
    public static final int COEFF_ADJUST_MIN_CYCLE = 10;//最小循环数
    public static final int COEFF_ADJUST_IGNORE_CYCLE = 5;//忽略前n个数据

    //Pid默认值
    public static final String PID_DEFAULT_P = "0.2";//Pid默认值--P
    public static final String PID_DEFAULT_I = "0.0009";//Pid默认值--P
    public static final String PID_DEFAULT_D = "0.0015";//Pid默认值--P
}
